package com.wang.jmonkey.modules.system.model.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.wang.jmonkey.common.model.entity.BaseEntity;

import com.wang.jmonkey.modules.system.model.enums.SystemAclPrincipalTypeEnum;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * 资源权限信息表(SystemAcl)表实体类
 *
 * @author HeJiawang
 * @since 2021-05-21 21:43:54
 */
@TableName("system_acl")
@Data
@Accessors(chain = true)
public class SystemAclEntity extends BaseEntity<SystemAclEntity> {

    private Long id;

    /**
     * 权限主体类型 user 代表system_user ; role 代表system_role
     */
    private SystemAclPrincipalTypeEnum principalType;

    /**
     * 权限主体id，如 principal_type = user 则 principal_id = system_user.id
     */
    private Long principalId;

    /**
     * 资源id，system_resource的id字段
     */
    private Long resourceId;

}
